package com.example.controller;

import com.example.model.Machine;
import com.example.model.QrcodeProduct;
import com.example.service.MachineService;
import com.example.service.QrcodeProductService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/data")
public class QrcodeProductController {

    @Resource
    public QrcodeProductService qrcodeProductService;

    @GetMapping("/getProductByQrcode")
    public QrcodeProduct getProductByQrcode(String qrcode,String processNo) {
        QrcodeProduct qrcodeProduct = qrcodeProductService.getProductByQrcode(qrcode,processNo);
        return qrcodeProduct;

    }
}
